#include <dos/datetime.h>
#include <proto/dos.h>
LONG StrToDate()
SYNOPSIS
struct DateTime * datetime
LOCATION
In DOSBase at offset 125
FUNCTION
Converts a human readable ASCII string into an AmigaDOS
DateStamp.
INPUTS
DateTime
a pointer to an initialized DateTime structure.
The structure should be initialized as follows:
\begin{description}
\item{dat_Stamp} The converted date will be written here
\item{dat_Format} How to convert the datestamp into
dat_StrDate. Can be any of the following:
\begin{description}
dd
mmm-yy). This
is the default if you specify something other
than any entry in this list.
yy
mmm-dd).
mm
dd-yy).
dd
mm-yy).
\item{FORMAT_DEF} default format for locale.
\end{description}
\item{dat_Flags} Modifies dat_Format. The only flag
used by this function is DTF_FUTURE. If set, then
a string like "Monday" refers to the next monday.
Otherwise it refers to the last monday.
\item{dat_StrDay} Ignored.
\item{dat_StrDate} Pointer to valid string representing the
date. This can be a "DTF_SUBST" style string such
as "Today" "Tomorrow" "Monday", or it may be a
string as specified by the dat_Format byte. This
will be converted to the ds_Days portion of the
DateStamp. If this pointer is NULL,
DateStamp
>ds_Days will not be affected.
\item{dat_StrTime} Pointer to a buffer which contains the
time in the ASCII format hh:mm:ss. This will be
converted to the ds_Minutes and ds_Ticks portions
of the DateStamp. If this pointer is NULL,
ds_Minutes and ds_Ticks will be unchanged.
\end{description}
RESULT
A zero return indicates that a conversion could not be performed. A
non-zero return indicates that the DateTime.dat_Stamp variable
contains the converted values.